<template>
  <div id="picture">
    <md-card v-for="(r,i) in picture" :key="i">
      <md-card-media>
        <img :src="r.url" alt="People">
      </md-card-media>
    </md-card>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  name: "picture",
  mounted() {
    this.getPicture({ page: "1" });
  },
  computed: {
    ...mapState({
      picture: state => state.picture
    })
  },
  methods: {
    ...mapActions({
      getPicture: "GET_PICTURE"
    })
  }
};
</script>

<style lang="less" scoped>
.md-card {
  margin: 4px;
  display: inline-block;
  vertical-align: top;
}
@media screen and (max-width: 414px) {
   .md-card {
    width: 122px;
  }
}
@media screen and (max-width: 375px) {
  .md-card {
    width: 109px;
  }
}
@media screen and (max-width: 320px) {
  .md-card {
    width: 91px;
  }
}
</style>